<?php
namespace Home\Model;
use Think\Model;
class OrderModel extends Model{

	public function Verifyoid($oid)
	{
		$state = $this->where("id = $oid")->find();
		if ($state) {
			return true;
		}else{
			return false;
		}
	}
	public function Verifystate($oid)
	{
		$state = $this->where("id = $oid and state != 8")->field('id')->find();
		if ($state) {
			return true;
		}else{
			return false;
		}
	}
	public function Verifytime($oid)
	{
		$state = $this->where("id = $oid and (unix_timestamp(now())<operatingtime+600) and state = 2")->field('id')->find();
		if ($state) {
			return true;
		}else{
			return false;
		}
	}

}
